<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script type="text/javascript">

    var nums = [1,3,8,6,5,4,9,2];
    nums.sort(function(n1,n2){
      return n2-n1;
    });
    console.log(nums);


    var stu = new Object();
    stu.id=1;
    stu.name='zhangsan';
    stu.study=function(){
      console.log(this.name+"好好学习，天天向上");
    }

    stu.study();


    var stu2={
      id:2,
      name:'lisi',
      study:function(){
        console.log(this.name+"好好学习，天天向上");
      }
    };
    stu2.study();
  </script>
</head>
<body>
  hello html
</body>
</html>